const path = require('path')
const modules = require('./webpack.modules')
const plugins = require('./webpack.plugins')
const server = require('./webpack.server')
const cache = require('./webpack.cache')
const resolve = require('./webpack.resolve')

module.exports = {
    ...resolve,

    /** 入口 */
    entry: './src/index.tsx',

    /** 模式 */
    mode: 'development',
    // mode: 'production' ,
    // mode: 'none' ,

    /** 出口（输出） */
    output: {
        filename: './bundle.js',
        path: path.resolve(__dirname, 'dist')
    },

    devtool: 'source-map',


    /** 模块 */
    ...modules,

    /** 插件 */
    ...plugins,

    /** 服务器 */
    ...server,

    /** 缓存 */
    ...cache,

}